<template>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="id" label="Id" width="180" />
      <el-table-column prop="username" label="Name" width="180" />
      <el-table-column prop="role" label="Role" />
      <el-table-column prop="department" label="部门" />
      <el-table-column prop="position" label="职位" />
    </el-table>
  
  
  
  </template>
  
  
<script setup>
import { ref,onMounted } from 'vue'
import axios from 'axios';
import http from '../http';



  
const tableData = ref([])
  
  
const getdata = () => {
    http.get('http://127.0.0.1:8000/rbac/ulist/')
    .then((res) => {
        tableData.value = res.data
    })
  
}
  
  
onMounted(() => {
      getdata()
})
  
  
  
  
  </script>
  
  
  
  <style scoped>
  
  
  
  </style>




